home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
c
/
bitstrg.zip
/
DECARBIT.C
< prev
next >
Wrap
C/C++ Source or Header
|
1989-06-05
|
718b
|
39 lines
/*
librairie : bitstrg
decarbit -- declaration d'un champ memoire comme etant un champ de bits
*/
/*
#define debug
*/
/* standard include */
#include <stdio.h>
#include "bitstrg.h"
/*
declaration of a memory field as an array of bit
return a pointer on the array parameters structure or NULL if problem
*/
struct SPARRAY* decarbit(ptr,nombr)
ELEBAR* ptr; /* pointer on the memory field */
unsigned nombr; /* number of elements in the field */
{
struct SPARRAY* pnt;
if(nombr == 0) {
return(NULL);
}
if((pnt = (struct SPARRAY *) calloc (1,sizeof(struct SPARRAY))) != NULL) {
pnt->pntarray = ptr;
pnt->numlbit = (nombr * SIZE) - 1;
}
return(pnt);
}